{extend name="public:base" /}
{block name="action"}
<a type="button" class="btn btn-w-m btn-primary"
   href="{:url('dc6')}">  导出
</a>
{/block}
{block name="content"}
<div class="wrapper wrapper-content animated fadeInRight" xmlns="http://www.w3.org/1999/html">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox ">
                <div class="ibox-content">
                    <form method="get">
                        <div class="row">
                            <div class="col-sm-3">
<!--                                 <select class="form-control m-b" name="sealId" placeholder="印章名称">
                                    <option value="" {if condition="!$params.sealId" } selected {
                                    /if}>所有</option>
                                    {volist name="seals" id="entity"}
                                    <option value="{$entity.id}" {eq name="entity.id" value="$params.sealId" } selected
                                            {
                                    /eq}>{$entity.name}</option>
                                    {/volist}
                                </select> -->
                                <select class="form-control m-b" name="sealId" placeholder="印章名称">
                                    <option value="">所有</option>
                                    {volist name="seals" id="entity"}
                                    <option value="{$entity.id}" {if condition="$entity.id eq $params.sealId"}selected{/if}>{$entity.name}</option>
                                    {/volist}
                                </select>
                            </div>
                            <div class="col-sm-4" id="dateTime">
                                <div class="row">
                                    <div class="col-sm-6">
                                        <div class="input-group">
                                            <input type="text" name="startTime" id="startTime"
                                                   value="{$params.startTime}"
                                                   readonly unselectable="on"
                                                   placeholder="开始时间"
                                                   class="form-control">
                                            <div class="input-group-addon"><i class="fa fa-calendar"></i></div>
                                            </span>
                                        </div>
                                    </div>
                                    <div class="col-sm-6">
                                        <div class="input-group">
                                            <input type="text" name="endTime" id="endTime" value="{$params.endTime}"
                                                   placeholder="结束时间"
                                                   readonly unselectable="on"
                                                   class="form-control">
                                            <div class="input-group-addon"><i class="fa fa-calendar"></i></div>
                                            </span>
                                            <div class="input-group-append">
                                                <button type="submit" class="btn btn-sm btn-primary"><i
                                                        class="fa fa-search"></i> 搜索
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                    <table class="table table-stripped ">
                        <thead>
                        <tr>
                            <th>#</th>
                            <th>印章名称</th>
                            <th>申请次数</th>
                            <th>申请用章次数</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {notempty name="list"}
                        {volist name="list" id="vo" key="k"}
                        <tr>
                            <td>{$k}</td>
                            <td>{$vo.seal.name}</td>
                            <td>{$vo.formCount}</td>
                            <td>{$vo.formApplyCount}</td>
                            <td class="project-actions">
                                <a href="{:url('appFormDetailList')}?sealId={$vo.seal_id}"
                                   class="btn btn-primary btn-sm detail"><i
                                        class="fa fa-eye"></i> 查看明细 </a>
                            </td>
                        </tr>
                        {/volist}
                        {/notempty}
                        </tbody>
                    </table>
                    {$list->render()}
                </div>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="js"}
<script type="text/javascript">
    $(document).ready(function () {

        laydate.render({
            elem: "#dateTime",
            //设置开始日期、日期日期的 input 选择器
            //数组格式为 5.3.0 开始新增，之前版本直接配置 true 或任意分割字符即可
            range: ['#startTime', '#endTime']
        });
        $(".process-flow-btn-dialog").on("click", function (e) {
            e.preventDefault();
            $.get($(e.currentTarget).attr("href"), function (data) {
                new ModalDialog({
                    content: data,
                    closeBtn: false,
                    success: function (data) {
                        return true;
                    }
                }).show();
            })
        });
    });
</script>
{/block}
{block name="css"}
<link rel="stylesheet" href="__ADMIN__/css/process-timeline.css">
{/block}